package com.hntest.controller;

import com.hntest.entity.Moneywithdraw;
import com.hntest.entity.Pager;
import com.hntest.entity.RealAuth;
import com.hntest.service.MoneyWithDrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller("MoneyWithDrawController")
public class MoneyWithDrawController {

    @Autowired
    private MoneyWithDrawService moneyWithDrawService;

    public void setMoneyWithDrawService(MoneyWithDrawService moneyWithDrawService) {
        this.moneyWithDrawService = moneyWithDrawService;
    }

    @RequestMapping(value = "p2p/MoneyWithDraw",method = {RequestMethod.GET,RequestMethod.POST})
    public String select(Pager pager, Moneywithdraw moneywithdraw, ModelMap modelMap, HttpServletRequest request){
        List<Moneywithdraw> list = moneyWithDrawService.getListByPage(pager,moneywithdraw);
        modelMap.put("list",list);
        modelMap.put("pager",pager);
       // modelMap.put("realAuth",realAuth);
        return "p2p/MoneyWithDraw";
    }
}
